<include file="Public/min-header"/>
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<div class="wrapper">
  <include file="Public/breadcrumb"/>
  <section class="content"> 
    <div class="container-fluid">
      <div class="panel panel-default">
        <div class="panel-heading">
          <h3 class="panel-title"><i class="fa fa-list"></i>平台未收款订单</h3>
        </div>
        <div class="panel-body">    
		<div class="navbar navbar-default">                    
                <form id="search-form2" class="navbar-form form-inline"  method="get" action="{:U('order_no_statis')}">
				<div class="input-group">
					<input type="text" name="order_sn" value="{:I('order_sn')}" placeholder="订单 编号" id="input-order-id" class="form-control">
					  </div>
                <div class="form-group">                  
                   <div class="input-group margin">                    
                    <div class="input-group-addon">
                        	下单时间<i class="fa fa-calendar"></i>
                    </div>
                       <input type="text" id="create_date" value="{$create_date}" name="create_date" class="form-control pull-right" style="width: 200px">
                  </div>
                </div>
                <div class="form-group">    
                    <button class="btn btn-primary" id="button-filter search-order" type="submit"><i class="fa fa-search"></i> 筛选</button>    
                </div>                                 
                </form>    
          </div>                        
          <div id="ajax_return">                  
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <th class="sorting text-left">订单ID</th>
                                <th class="sorting text-left">订单SN</th>
                                <th class="sorting text-left">订单金额</th>
                                <th class="sorting text-left">实际价格（改价）</th>
								<th class="sorting text-left">平台扣点</th>
								<th class="sorting text-left">应收金额</th>
								<th class="sorting text-left">下单时间</th>
                                <th class="sorting text-left">订单状态</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="list" id="v"> 
                                <tr>
                                    <td class="text-left">{$v.order_id}</td>
                                    <td class="text-left" style="color:#3c8dbc;">{$v.order_sn}</td>
                                    <td class="text-left">{$v.total_amount}</td>
                                    <td class="text-left" style="color: red;">{$v.order_amount}</td>
									<td class="text-left" style="color:blue;">-{$v.p_price}</td>
									<td class="text-left" style="color:red;">{$v.y_price}</td>
                                    <td class="text-left">{$v.add_time|date="Y-m-d H:i",###}</td>
                                    <td class="text-left">{$order_status[$v['order_status']]}，<span style="color:red;">未收款</span></td>
                                </tr>
                            </volist>
							<tr style="font-size: 16px;">
								<td class="text-right" colspan="3">合计：</td>
								<td class="text-left" style="color: red;">{$heji_price}</td>
								<td class="text-left" style="color: blue;">-{$p_price_count}</td>
								<td class="text-left" style="color: red;">{$heji_price-$p_price_count}</td>
							</tr>
                            </tbody>
                        </table>
                    </div>
                
                <div class="row">
                    <div class="col-sm-6 text-left"></div>
                    <div class="col-sm-6 text-right">{$show}</div>
                </div>
          
          </div>
        </div>
      </div>
    </div>
    <!-- /.row --> 
  </section>
  <!-- /.content --> 
</div>
<!-- /.content-wrapper --> 
 <script>
 
$(document).ready(function() {
	$('#create_date').daterangepicker({
		format:"YYYY-MM-DD",
		singleDatePicker: false,
		showDropdowns: true,
		minDate:'2016-01-01',
		maxDate:'2030-01-01',
		startDate:'2016-01-01',
        showWeekNumbers: true,
        timePicker: false,
        timePickerIncrement: 1,
        timePicker12Hour: true,
        ranges: {
           '今天': [moment(), moment()],
           '昨天': [moment().subtract('days', 1), moment().subtract('days', 1)],
           '最近7天': [moment().subtract('days', 6), moment()],
           '最近30天': [moment().subtract('days', 29), moment()],
           '上一个月': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
        },
        opens: 'right',
        buttonClasses: ['btn btn-default'],
        applyClass: 'btn-small btn-primary',
        cancelClass: 'btn-small',
	    locale : {
            applyLabel : '确定',
            cancelLabel : '取消',
            fromLabel : '起始时间',
            toLabel : '结束时间',
            customRangeLabel : '自定义',
            daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
            monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月' ],
            firstDay : 1
        }
	});
});
</script>
</body>
</html>